package com.example.springcloudfeign.feign;

import com.alibaba.fastjson.JSONObject;
import com.example.springcloudfeign.feign.impl.TestFeignImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.Map;

/**
 * @author X.I.O
 * @title: TestFeign
 * @projectName spring-cloud-1
 * @description: TODO
 * @date 2021/11/7 13:27
 */
@FeignClient(value = "feign-provider",fallback = TestFeignImpl.class)
public interface TestFeign {

    @GetMapping(value = "/welcome")
    String hello();

    @PostMapping(value = "/test-url-1")
    public JSONObject getJSONObject(Map<String, Object> map);
}
